package com.yupi.springbootinit.service;

import com.yupi.springbootinit.model.entity.Orders;
import com.yupi.springbootinit.model.entity.Teachers;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.springbootinit.model.vo.LoginTeacherVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author zjb13
* @description 针对表【teachers(教师)】的数据库操作Service
* @createDate 2024-11-28 22:39:31
*/
public interface TeachersService extends IService<Teachers> {
    LoginTeacherVO getLoginUserVO(Teachers user);

    /**

     */
    Teachers getSafetyUser(Teachers originUser);

    /**
     * 用户登录
     *
     * @param userAccount  用户账户
     * @param userPassword 用户密码
     * @param request
     * @return 脱敏后的用户信息
     */
    LoginTeacherVO userLogin(String userAccount, String userPassword, HttpServletRequest request);

    /**
     * 获取当前登录用户
     *
     * @param request
     * @return
     */
    Teachers getLoginUser(HttpServletRequest request);

    long userRegister(String userAccount, String userPassword, String checkPassword);

    List<Teachers> searchUsersByTags(List<String> tagNameList);

    boolean deleteTempOrder(long id, Teachers loginUser);

    List<Orders> matchOrders(long num, Teachers loginUser);

    Boolean confirmOrder(long id, Teachers loginUser);

    void updateRate(int rate, Teachers teachers);

    void updateComment(Teachers teachers);
}
